Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill the incomplete usage of async methods. #138

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

A9G-Data-Droid
Copy link
Contributor

I apologize if I don't know the historical reasons why not all the methods are async. I did a quick review and wanted to share my notes. I hope some of these changes useful.

All tests pass without modification.

  • Prefer Task.Run over Task.Factory.StartNew
  • Compile in release mode with overflow checks for safety.
  • Implement await using when available.
  • Remove unused result.GetType();
  • CA1835: Prefer the memory-based overloads of ReadAsync/WriteAsync

 - Prefer Task.Run over Task.Factory.StartNew
 - Compile in release mode with overflow checks for safety.
 - Implement `await using` when available.
 - Remove unused `result.GetType();`
- CA1835: Prefer the memory-based overloads of ReadAsync/WriteAsync
@adoconnection
Copy link
Owner

Thanks! Improvements are always welcome 🚀
You mean ReadLong and WriteLong? Well they manipute few bytes so I thought its insignificant, no other reasons

@adoconnection adoconnection merged commit a6e8e84 into adoconnection:master Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants